package com.example.demo.service;

import com.example.demo.dao.TbuserDao;
import com.example.demo.entity.Tbuser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;
import java.util.UUID;

@Service
@Transactional
public class TbuserService {

    @Autowired
    private TbuserDao tbuserDao;

    public void save(Tbuser tbuser){
        tbuser.setId(UUID.randomUUID().toString());
        tbuserDao.save(tbuser);
    }
}
